import axios from 'axios';

// 创建axios实例，模拟前端API请求
const api = axios.create({
  baseURL: 'http://localhost:3000/api',
  headers: {
    'Content-Type': 'application/json'
  }
});

// 获取排班类型数据
async function getShiftTypes() {
  try {
    const response = await api.get('/shift-types');
    console.log('排班类型数据:');
    console.log(JSON.stringify(response.data, null, 2));
  } catch (error) {
    console.error('获取排班类型失败:', error.message);
  }
}

getShiftTypes();